home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 12
/
Cream of the Crop 12 (Part II)
/
Cream of the Crop 12 (Part II).iso
/
BBS
/
EZY120_1.ZIP
/
STRUCT.ARJ
/
CLIB.ARJ
/
STR2.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1996-03-09
|
443 b
|
23 lines
#include <ezylib.h>
#include <string.h>
char *FirstWord(char *FirstWordStr,char *SourceStr)
{
char *Temp = new char[strlen(SourceStr)+1];
strcpy(Temp,SourceStr);
char *S = strchr(Temp,' ');
if (S) {
strcpy(SourceStr,S);
TrimLead(SourceStr);
*S = '\0';
strcpy(FirstWordStr,Temp);
} else {
strcpy(FirstWordStr,SourceStr);
*SourceStr = '\0';
}
delete Temp;
return(FirstWordStr);
}